<?php
if(isset ($_POST['save_gadgettech']))
{
	$user_id= $_SESSION['tcADMINID'];
    $store = $_POST['store'];
	$url = $_POST['url'];
	$gad = $_POST['gad'];
	
	$make = $_POST['make'];
	$spec = mysql_escape_string($_POST['maincont']);
	$price = $_POST['price'];
	$flag = $_POST['flag'];
	$authorised = $_POST['authorised'];
	
	$file=gmdate('YmdHis').$_FILES["upload"]["name"] ;
     move_uploaded_file($_FILES["upload"]["tmp_name"],"../uploads/gadget_images/".$file);
		
			
			mysql_query("insert into gadget_technology(store,store_url,gadget,make,specifications,price,	image,sale_flag,active_status,
													   created_datetime) values ('$store', '$url','$gad','$make','$spec','$price',
													   '".$file."','$flag','$authorised',
													   now() )");
			
			
			echo "<script>window.location='index.php?tc=gadgettech_add&_e=2'</script>";die();
	}
	else
	{
		//header("location:index.php?tc=picture_add&_e=1");	
		echo "<script>window.location='index.php?tc=gadgettech_add&_e=1'</script>";
	}	

?>